import Person from './person';
class Teacher extends Person{
    constructor(name,age,klass){
        super(name,age);
        this.klass=klass;
    }
    introduce(){
        let introduce;
        if(this.klass!=null){
            introduce=super.introduce()+` I am a Teacher. I teach Class ${this.klass}.`;
        }
        else{
            introduce=super.introduce()+` I am a Teacher. I teach No Class.`;
        }
        return introduce;
    }
}
module.exports= Teacher;

